package com.bjpowernode.app;

import com.bjpowernode.myenum.City;
import com.bjpowernode.myenum.Week;


public class MyApp {
    public static void main(String[] args) {
        System.out.println(Week.A);
        System.out.println(Week.A.toString());
        System.out.println("*************************************");
        Week[] values = Week.values();
        for (Week value : values) {
            System.out.println(value);
        }

        City[] cities = City.values();
        for (City city : cities) {
            System.out.println(city.toString());
        }
        //返回枚举对象的位置
        int ordinal = City.广州.ordinal();
        System.out.println(ordinal);
        ordinal = City.深圳.ordinal();
        System.out.println(ordinal);
        System.out.println("**************************************");
        System.out.println(City.广州.compareTo(City.深圳));


    }
}
